package csu.ssd.student;


import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.stage.Stage;

import java.io.IOException;

public class SignOnController {

    @FXML
    private Button login;

    @FXML
    private Button register;
    @FXML
    private Button changeButton;
    @FXML
    private Label label_1;
    @FXML
    private Label label_2;
    @FXML
    void login_click(ActionEvent event) {


        Stage stage =(Stage)  login.getScene().getWindow();
        stage.close();
        csu.ssd.student.Shouye shouye=new Shouye();
        try {
            shouye.start(stage);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }//跳转到后续页面

    @FXML
    void register_click(ActionEvent event) {

        Stage stage =(Stage)  login.getScene().getWindow();
        stage.close();
        csu.ssd.student.SignIn signIn= new SignIn();

            signIn.start(stage);


    }//跳转到注册页面
    @FXML
    void change(ActionEvent event)
    {
        String str=label_1.getText();
        if(str.equals("学号"))
        {
            label_1.setText("手机号");
            label_2.setText("验证码");
        }
        else
        {
            label_2.setText("密码");
            label_1.setText("学号");
        }
    }


}

